import 'dart:convert';

/// 选择项
class SelectOption {
  String label;
  String value;
  dynamic tag;
  SelectOption(this.label, this.value, {this.tag});
  Map<String, dynamic> toJson() {
    return {
      'label': label,
      'value': value,
      'tag': tag,
    };
  }

  factory SelectOption.fromJson(Map<String, dynamic> json) {
    return SelectOption(
      json['label'] as String,
      json['value'] as String,
      tag: json['tag'],
    );
  }
  @override
  String toString() {
    return jsonEncode(toJson());
  }
}
